


Update={};

function LuaMain()

   
    ab=self:Lua_GetBundle("ui","inputpassword",isCopy);
	Inputpassword = CS.UnityEngine.Object.Instantiate(ab:LoadAsset("inputpassword").gameObject).gameObject;
	Inputpassword.transform:SetParent(Canvas.transform);
	self.objectManager:AddModularGameObject("inputpassword",Inputpassword);
	local passwordTransform =Inputpassword:GetComponent("RectTransform");
	passwordTransform.localScale=CS.UnityEngine.Vector3.one;
	passwordTransform.sizeDelta=CS.UnityEngine.Vector2(250,250);
    passwordTransform.localPosition=CS.UnityEngine.Vector3.zero;   
    passwordTransform:SetSiblingIndex(10000);
    Inputpassword:SetActive(false);
    self.aRcameraManager:StopCapture();
    ARcreate:loadJson("/ar/getUpdatePicture",getUpdatePicture);
end

function ARconfigBack(jd)

    tmpjson = rapidjson.decode(jd)
    if(tmpjson.Error==false) then

       ArConfig = rapidjson.decode(tmpjson.Text)
       local s1 = rapidjson.encode(ArConfig)
       ARcreate:SetARvideo(s1);
    else
        ARcreate:loadJson("/ar/getConfigNew",ARconfigBack);
    end
    json={}
    json[1]=rapidjson.decode('{"loacl": {"url": "/ui/Updateconfig.Update","UrlType": 1,"Type": 1},"server": {"url": "/ui/Updateconfig.Update","UrlType": 1,"Type": 1}}')
    json[1]=rapidjson.decode('{"loacl": {"url": "/ui/LuaUpdateconfig.Update","UrlType": 1,"Type": 2},"server": {"url": "/ui/LuaUpdateconfig.Update","UrlType": 1,"Type": 2}}')
    local w1 = rapidjson.encode(json)
if(isCopy==true)then
  self:Lua_Copy(
    function() 
        self:Lua_Update(w1,UpdateEnd,UpdateProgress,CompleteBack,IsUpdateBack);
  end);
else
    self:Lua_Update(w1,UpdateEnd,UpdateProgress,CompleteBack,IsUpdateBack);
end
    
end

function getUpdatePicture(jd)
    tmpjson = rapidjson.decode(jd)
    if(tmpjson.Error==false) then
        ArConfig = rapidjson.decode(tmpjson.Text)
        local s = rapidjson.encode(ArConfig)
        self.ARgetUpdate:ResolveConfigFile(s);
        ARcreate:loadJson("/ar/getConfigNew",ARconfigBack);
    else
        ARcreate:loadJson("/ar/getUpdatePicture",getUpdatePicture);
   end 
end


Update.ARmap=function()

    NetWork= self:GetNetWork();
    if(NetWork=="当前网络：不可用") then

    elseif(NetWork=="当前网络：3G/4G")then
    
    elseif(NetWork== "当前网络 : WIFI")then
         
    else
        
    end 

end


function UpdateEnd(arg)

 
end
function UpdateProgress(arg)
    
end
function CompleteBack(arg)
   
end
function IsUpdateBack(arg1,arg2)
   
    if(arg1==0)then
     
    else
        self:Lua_StartUpdate()

    end


end